package com.github.limit.annotation;


import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import java.util.concurrent.TimeUnit;


/**
 * 默认全局限流
 * 设置group时，则按照设置的group分组限流
 *
 */
@Target({ElementType.METHOD,ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Limit
public @interface GlobalAccessLimit {

    TimeUnit timeUnit() default TimeUnit.SECONDS;

    long limit() default 0;

    int order() default 0;

    String group() default "";
}
